public class Question3 {
    public static void main(String[] args) {
        // 循环变量 i 是控制循环次数的(尽量用i做变量)
        for (int i = 100; i < 1000; i++) {
            //在下面式子里.不要改变i的值,导致出现死循环
            int num = i;
            int hundreds = num / 100;
            num = num % 100;
            int tens = num / 10;
            num = num % 10;
            if (i == hundreds * hundreds * hundreds
                    + tens * tens * tens
                    + num * num * num) {
                System.out.println(i);
            }
        }
    }
}